//
//  LaundryBasketBottomView.m
//  WashForU
//
//  Created by 王俊 on 15/12/7.
//  Copyright © 2015年 王俊. All rights reserved.
//

#import "LaundryBasketBottomView.h"
@interface LaundryBasketBottomView()
@property(nonatomic,strong)UILabel   *totalTitleLabel;
@end

@implementation LaundryBasketBottomView


- (instancetype)initWithView
{
    if(self = [super init]){
        self.commitButton = [[UIButton alloc]init];
        self.totalTitleLabel = [[UILabel alloc]init];
        self.totalNumberLabel = [[UILabel alloc]init];
        
        self.backgroundColor = [UIColor whiteColor];
        self.commitButton.backgroundColor = [UIColor CustomLightBlue];
        self.commitButton.layer.cornerRadius = 4;
        [self.commitButton setTitle:@"立即支付" forState:UIControlStateNormal];
        [self.commitButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
        [self.commitButton setTitleColor:[UIColor CustomLightBlue] forState:UIControlStateHighlighted];
        
        self.totalTitleLabel.textColor = [UIColor blackColor];
        self.totalTitleLabel.font = [UIFont systemFontOfSize:20];
        self.totalTitleLabel.text = @"合计:";
        self.totalNumberLabel.textColor = [UIColor CustomOrangeColor];
        self.totalNumberLabel.font = [UIFont boldSystemFontOfSize:20];
        
        
        
        [self addSubview:self.commitButton];
        [self addSubview:self.totalTitleLabel];
        [self addSubview:self.totalNumberLabel];
        
        [self.commitButton mas_makeConstraints:^(MASConstraintMaker *make) {
            make.trailing.equalTo(self).offset(-10);
            make.size.mas_equalTo(CGSizeMake(120, 40));
            make.centerY.equalTo(self);
        }];
        [self.totalTitleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.size.mas_equalTo(CGSizeMake(50, 40));
            make.leading.equalTo(self).offset(20);
            make.centerY.equalTo(self);
        }];
        [self.totalNumberLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.height.centerY.equalTo(self.totalTitleLabel);
            make.leading.equalTo(self.totalTitleLabel.mas_trailing);
        }];
        
        
        
        
    }
    
    return self;
}


@end
